<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
        <form class="layui-form" action="<?=url('user/edit');?>">
          <input type="hidden" name="id" value="<?=$info['id']?>" >
          <div class="layui-form-item">
            <label class="layui-form-label">推荐人</label>
            <div class="layui-input-block">
              <!--<div class="layui-col-lg1">-->
                <!--<button class="layui-btn layui-btn-sm layui-btn-normal" onclick="javascript:layer.open({title:'选择推荐人',type:2,area: ['60%', '60%'],content:'<?=url('user/cuser')?>'});">-->
                    <!--<i class="layui-icon">&#xe615;</i>-->
                    <!--<cite>选择推荐人</cite>-->
                <!--</button>-->
              <!--</div>-->
              <div class="layui-col-lg9">
                <input type="hidden" name="s_id" id="s_id" value="<?=$info['s_id']?>" >
                <input type="text" id="s_info" value="<?=$s_info?>" placeholder="推荐人信息" disabled="disabled" autocomplete="off" class="layui-input">
              </div>
            </div>
          </div>
            <div class="layui-form-item">
              <label class="layui-form-label">会员等级</label>
              <div class="layui-input-block">
                <input type="text" value="<?=c('type.user_level')[$info['level']];?>" placeholder="会员等级" disabled="disabled" autocomplete="off" class="layui-input">
                    <!--<select name="level" required lay-verify="required" >-->
                        <!--<option value="">请选择</option>-->
                      <!--<?php foreach(c('type.user_level') as $key => $v):?>-->
                          <!--<option value="<?=$key?>" <?php if($key==$info['level']):?>selected<?php endif;?>> <?=$v?> </option>-->
                      <!--<?php endforeach;?>-->
                    <!--</select>-->
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">会员姓名</label>
              <div class="layui-input-block">
                <input type="text" name="name" value="<?=$info['name']?>" required lay-verify="required" placeholder="请输入会员姓名" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">会员电话</label>
              <div class="layui-input-block">
                <input type="text" name="phone" value="<?=$info['phone']?>" placeholder="请输入会员电话"  autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">会员地址</label>
              <div class="layui-input-block">
                <input type="text" name="address" value="<?=$info['address']?>" placeholder="请输入会员地址"  autocomplete="off" class="layui-input">
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">用户状态</label>
              <div class="layui-input-block">
                <select name="status">
                  <?php foreach(c('type.status') as $k => $v):?>
                  <option value="<?=$k?>" <?php if($k == $info['status']):?> selected <?php endif;?> ><?=$v?></option>
                  <?php endforeach;?>
                </select>
              </div>
            </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script>
layui.use(['form','rate'], function(){
  var $ = layui.$
  ,form = layui.form
  form.render();
  //var ue = UE.getEditor('container');
});
function cuser(rs){
  var index = layer.getFrameIndex(window.name);
  layer.close(index);
  var msg = "姓名:"+rs.name+"  电话:"+rs.phone+" 等级:"+rs.level
  $("#s_info").val(msg);
  $("#s_id").val(rs.id);
}
</script>
